﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace BusinessLogic.Command
{
    public class GetUserCommand : BaseCommand<APP_USERS>
    {
        private string _username { get; set; }
        private string _password { get; set; }

        public GetUserCommand(string username, string password)
        {
            _username = username;
            _password = password;
        }

        public override void Command()
        {
            CubeOfDB2Entities ctx = new CubeOfDB2Entities();

            Result = ctx.APP_USERS.Where(o => o.usrname == _username && o.passwd == _password).FirstOrDefault();
        }
    }
}